package day13;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Scanner;

public class Test {
    static Scanner sc = new Scanner(System.in);
    List<User> users=new ArrayList<>();
    public static void main(String[] args) {
        Register();
    }
    public static void Register() {
        System.out.println("====欢迎来到套餐系统====");
        selectNumber();
        selectPackage();
    }
    public static void selectNumber(){
        System.out.println("请选择您心仪的卡号");
        Random r = new Random();
        String[] numbers = new String[9]; // 存储生成的9个号码
        for(int i=0;i<9;i++) {
            int randomNum = r.nextInt(900000) + 100000;
            numbers[i] = "139" + randomNum;
        }
        for(int i=0;i<9;i++) {
            System.out.print((i+1) + "." + numbers[i] + "\t");
            if ((i+1) % 3 == 0) {
                System.out.println();
            }
        }
            System.out.print("请选择卡号(1-9): ");
            int choice = sc.nextInt();
            System.out.println("您选择的号码位"+choice);
    }
    public static void selectPackage(){
        System.out.println("请选择您心仪的套餐");
        System.out.println("1.话痨套餐(月租:58)");
        System.out.println("2.超人套餐(月租:38)");
        System.out.println("3.网虫套餐(月租:28)");
        Package selectedPackage;
        int n=sc.nextInt();
        switch (n){
            case 1: selectedPackage=new MoreTalking(58);
            case 2: selectedPackage=new Super(38);
            case 3: selectedPackage=new InTraffic(28);
        }
        System.out.println("请输入用户名:");
        String name=sc.next();
        System.out.println("请输入密码:");
        String password=sc.next();
        System.out.println("请输入预存的花费金额:");
        int money=sc.nextInt();
        //User user=new User()
    }

}